CGGenTransMatrixZ2Dir2

Section: C Library Functions (3)
Updated: IRIT Version 6.0
Index Return to Main Contents
 

NAME

CGGenTransMatrixZ2Dir2()  

SYNOPSIS

geom_lib/geomat3d.c:1231

void CGGenTransMatrixZ2Dir2(MatrixType Mat,
                            VectorType Trans,
                            VectorType Dir,
                            VectorType Dir2,
                            RealType Scale)
 

DESCRIPTION

Routine to prepare a transformation martix to do the following (in this order): scale by Scale, rotate such that the Z axis is in direction Dir and X axis is direction T and then translate by Trans. Algorithm: given the Trans vector, it forms the 4th line of Mat. Dir is used to form the second line (the first 3 lines set the rotation), and finally Scale is used to scale first 3 lines/columns to the needed scale:
                |  Tx  Ty  Tz  0 |   A transformation which takes the coord
                |  Bx  By  Bz  0 |  system into T, N & B as required and
 [X  Y  Z  1] * |  Nx  Ny  Nz  0 |  then translate it to C. T, N, B are
                |  Cx  Cy  Cz  1 |  scaled by Scale. N is exactly Dir (unit vec) and T is exactly Dir2.  

PARAMETERS:

Mat: To place the computed transformation.

Trans: Translation factor.

Dir: Direction to take Z axis to.

Dir2: Direction to take X axis to.

Scale: Scaling factor.  

FUNCTION RETURN VALUE

void

 

ORIGIN

(C) Copyright 1989/90-95 Gershon Elber, Technion, IIT


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS:
FUNCTION RETURN VALUE
ORIGIN

This document was created by man2html, using the manual pages.
Time: 07:27:15 GMT, October 17, 2022